Systems and methods for video processing

ABSTRACT

The present disclosure relates to systems and methods for video encoding. The systems may determine a current string in a coding unit (CU) of an image frame. The current string may include one or more pixels. The systems may determine a first cost based on pixels with a same pixel value in the current string. The systems may determine a second cost based on one or more strings that are located above the current string. The systems may further determine a prediction string of the current string based on the first cost and the second cost. To determine the prediction string of the current string based on the first cost and the second cost, the systems may designate the current string as the prediction string of the current string in response to that the first cost and the second cost are not determined.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a Continuation of International Application No.PCT/CN2021/135660 filed on Dec. 6, 2021, which claims priority toChinese Patent Application No. 202011419569.3, filed on Dec. 6, 2020,Chinese Patent Application No. 202110199496.X, filed on Feb. 22, 2021,the contents of each of which are incorporated herein by reference intheir entirety.

TECHNICAL FIELD

The present disclosure relates to video data processing technology, andin particular, to systems and methods for video encoding.

BACKGROUND

A video may be compressed using video encoding technology to reduceamount of video data, a network bandwidth, a storage space in thetransmission of the video, etc. In present string prediction for videoencoding, for example, equal value string unit basis vector string(evs_ubvs) prediction, an equal value string (evs) can only be predictedwith a (0, −1) vector, which is too single. A unit basis vector string(ubvs) may cross pixel rows, so that an in-string reference may beperformed on the ubvs, which is not conducive to hardwareimplementation. String lengths of different strings (e.g., the evs, theubvs) are uncertain, which is not conducive to the hardwareimplementation and greatly increases the complexity of the hardwareimplementation. In addition, different strings are encoded based ontheir actual string lengths, so that a count of bits of the encoding islarge.

Therefore, it is desirable to provide systems and methods for videoprocessing, which may improve compression performance and reducedistortion, thereby improving the quality of the video encoding.

SUMMARY

An aspect of the present disclosure relates to a method for videoencoding. The method may include determining a current string in acoding unit (CU) of an image frame. The current string may include oneor more pixels. The method may include determining a first cost based onpixels with a same pixel value in the current string. The method mayinclude determining a second cost based on one or more strings that arelocated above the current string. The method may further includedetermining a prediction string of the current string based on the firstcost and the second cost. The determining the prediction string of thecurrent string based on the first cost and the second cost may includedesignating the current string as the prediction string of the currentstring in response to that the first cost and the second cost are notdetermined.

In some embodiments, the determining the second cost based on the one ormore strings that are located above the current string may includecomparing the current string with the one or more strings that arepointed to by a plurality of preset vectors, a count of the one or morestrings being larger than 1; determining, based on the comparison, atarget string from the one or more strings; and designating a cost ofthe target string as the second cost.

In some embodiments, the count of the one or more strings may beobtained by mapping a height of the CU based on a preset mappingrelationship. The preset mapping relationship may include a multiplelinear relationship or a nonlinear relationship.

In some embodiments, the method may further include designating twoadjacent strings among strings that have been predicted in the CU andsatisfy a condition as a pair of target strings; determining one or morefusion prediction strings by fusing the pair of target strings based onprediction strings of the pair of target strings and a fusion degree,the fusion degree including at least one of complete fusion orincomplete fusion; and determining one or more target prediction stringsof the pair of target strings based on prediction costs of theprediction strings of the pair of target strings and prediction costs ofthe one or more fusion prediction strings.

In some embodiments, the determining the one or more fusion predictionstrings by fusing the pair of target strings based on the predictionstrings of the pair of target strings and the fusion degree may include,determining, in response to styles of the prediction strings of the pairof target strings being the same, one fusion prediction string by fusingthe pair of target strings based on the complete fusion.

In some embodiments, the determining the one or more fusion predictionstrings by fusing the pair of target strings based on the predictionstrings of the pair of target strings and the fusion degree may includedetermining, in response to styles of the prediction strings of the pairof target strings being different, two fusion prediction strings byfusing the pair of target strings based on the incomplete fusion.

In some embodiments, the current string may be determined by setting alength of the current string being an integer multiple of a referencevalue. The reference value may be a natural number larger than 1.

In some embodiments, the determining the current string may includedetermining the current string by increasing a length of the currentstring to the integer multiple of the reference value.

In some embodiments, the determining the current string may includedetermining the current string by reducing a length of the currentstring to the integer multiple of the reference value.

In some embodiments, the determining the current string may includedetermining the current string based on a style of the current string.The style may include one of unmatched pixels, an equal value string(evs), and a unit basis vector string (ubvs) determined based on aplurality of preset vectors.

In some embodiments, the style of the current string may be theunmatched pixels. The determining the current string based on the styleof the current string may include determining the current string byincreasing unmatched pixels in the current string.

In some embodiments, the style of the current string may be the evs orthe ubvs determined based on the plurality of preset vectors. Thedetermining the current string based on the style of the current stringmay include determining the current string by reducing a length of theevs or the ubvs to the integer multiple of the reference value.

In some embodiments, the determining the prediction string of thecurrent string based on the first cost and the second cost may includecomparing the first cost and the second cost, and determining thepredicted string of the current string based on the comparison.

In some embodiments, the method may further include obtaining an encodedstring corresponding to the current string, and encoding the encodedstring based on the prediction string of the current string. Theencoding the encoded string based on the prediction string of thecurrent string may include obtaining, in response to that a type of theprediction string is ubvs, a pixel row spacing corresponding to aprediction vector of the prediction string and a count of pixel rowsoccupied by the prediction string; dividing, in response to that thecount of pixel rows occupied by the prediction string is greater thanthe pixel row spacing corresponding to the prediction vector of theprediction string, the prediction string into a plurality of subprediction strings, a count of pixel rows occupied by each of theplurality of sub prediction strings being greater than the pixel rowspacing; decoding the plurality of sub prediction strings in turn.

A further aspect of the present disclosure relates to a system for videoencoding. The system may include at least one storage device including aset of instructions and at least one processor in communication with theat least one storage device. When executing the set of instructions, theat least one processor may be directed to cause the system to implementoperations. The operations may include determining a current string in acoding unit (CU) of an image frame. The current string may include oneor more pixels. The operations may include determining a first costbased on pixels with a same pixel value in the current string. Theoperations may include determining a second cost based on one or morestrings that are located above the current string. The operations mayfurther include determining a prediction string of the current stringbased on the first cost and the second cost. The determining theprediction string of the current string based on the first cost and thesecond cost may include designating the current string as the predictionstring of the current string in response to that the first cost and thesecond cost are not determined.

A still further aspect of the present disclosure relates to a system forvideo encoding. The system may include a determination module, a firstcost determination module, a second cost determination module, and aprediction module. The determination module may be configured todetermine a current string in a coding unit (CU) of an image frame, thecurrent string including one or more pixels. The first costdetermination module may be configured to determine a first cost basedon pixels with a same pixel value in the current string. The second costdetermination module may be configured to determine a second cost basedon one or more strings that are located above the current string. Theprediction module may be configured to determine a prediction string ofthe current string based on the first cost and the second cost. Todetermine the prediction string of the current string based on the firstcost and the second cost, the prediction module may be configured todesignate the current string as the prediction string of the currentstring in response to that the first cost and the second cost are notdetermined.

A still further aspect of the present disclosure relates to anon-transitory computer readable medium including executableinstructions. When the executable instructions are executed by at leastone processor, the executable instructions may direct the at least oneprocessor to perform a method. The method may include determining acurrent string in a coding unit (CU) of an image frame. The currentstring may include one or more pixels. The method may includedetermining a first cost based on pixels with a same pixel value in thecurrent string. The method may include determining a second cost basedon one or more strings that are located above the current string. Themethod may further include determining a prediction string of thecurrent string based on the first cost and the second cost. Thedetermining the prediction string of the current string based on thefirst cost and the second cost may include designating the currentstring as the prediction string of the current string in response tothat the first cost and the second cost are not determined.

Additional features will be set forth in part in the description whichfollows, and in part will become apparent to those skilled in the artupon examination of the following and the accompanying drawings or maybe learned by production or operation of the examples. The features ofthe present disclosure may be realized and attained by practice or useof various aspects of the methodologies, instrumentalities, andcombinations set forth in the detailed examples discussed below.

BRIEF DESCRIPTION OF THE DRAWINGS

The present disclosure is further described in terms of exemplaryembodiments. These exemplary embodiments are described in detail withreference to the drawings. These embodiments are non-limiting exemplaryembodiments, in which like reference numerals represent similarstructures throughout the several views of the drawings, and wherein:

FIG. 1 is a schematic diagram illustrating an exemplary video processingprocess according to some embodiments of the present disclosure;

FIG. 2A is a schematic diagram illustrating an exemplary process fortraversing a current block according to some embodiments of the presentdisclosure;

FIG. 2B is a schematic diagram illustrating exemplary string predictionaccording to some embodiments of the present disclosure;

FIG. 3 is a flowchart illustrating an exemplary process for videoprocessing according to some embodiments of the present disclosure;

FIG. 4A is a flowchart illustrating an exemplary fusion process of apair of target strings according to some embodiments of the presentdisclosure;

FIG. 4B is a flowchart illustrating an exemplary fusion process of apair of target strings according to some embodiments of the presentdisclosure;

FIG. 4C is a flowchart illustrating an exemplary fusion process of apair of target strings according to some embodiments of the presentdisclosure;

FIG. 4D is a flowchart illustrating an exemplary fusion process of apair of target strings according to some embodiments of the presentdisclosure;

FIG. 5 is a block diagram illustrating an exemplary video processingsystem according to some embodiments of the present disclosure;

FIG. 6 is a schematic diagram illustrating an exemplary video processingdevice according to some embodiments of the present disclosure; and

FIG. 7 is a schematic diagram illustrating an exemplarycomputer-readable storage medium according to some embodiments of thepresent disclosure.

DETAILED DESCRIPTION

In the following detailed description, numerous specific details are setforth by way of examples in order to provide a thorough understanding ofthe relevant disclosure. However, it should be apparent to those skilledin the art that the present disclosure may be practiced without suchdetails. In other instances, well-known methods, procedures, systems,components, and/or circuitry have been described at a relatively highlevel, without detail, in order to avoid unnecessarily obscuring aspectsof the present disclosure. Various modifications to the disclosedembodiments will be readily apparent to those skilled in the art, andthe general principles defined herein may be applied to otherembodiments and applications without departing from the spirit and scopeof the present disclosure. Thus, the present disclosure is not limitedto the embodiments shown, but to be accorded the widest scope consistentwith the claims.

It should be understood that the term “encoding unit,” “current block,”“encoding block,” or “block,” used herein refer to a basic unit of imageprocessing or a specific position in an image and are usedinterchangeably. In addition, in the description of the presentdisclosure, the term “unit” includes all concepts of encoding unit,prediction unit, and transformation unit.

It will be understood that the terms “system,” “engine,” “unit,”“module,” and/or “block” used herein are one method to distinguishdifferent components, elements, parts, sections, or assemblies ofdifferent levels in ascending order. However, the terms may be displacedby other expressions if they may achieve the same purpose.

Generally, the words “module,” “unit,” or “block” used herein, refer tologic embodied in hardware or firmware, or to a collection of softwareinstructions. A module, a unit, or a block described herein may beimplemented as software and/or hardware and may be stored in any type ofnon-transitory computer-readable medium or other storage devices. Insome embodiments, a software module/unit/block may be compiled andlinked into an executable program. It will be appreciated that softwaremodules can be callable from other modules/units/blocks or fromthemselves, and/or may be invoked in response to detected events orinterrupts. Software modules/units/blocks configured for execution oncomputing devices may be provided on a computer-readable medium, such asa compact disc, a digital video disc, a flash drive, a magnetic disc, orany other tangible medium, or as a digital download (and can beoriginally stored in a compressed or installable format that needsinstallation, decompression, or decryption prior to execution). Suchsoftware code may be stored, partially or fully, on a storage device ofthe executing computing device, for execution by the computing device.Software instructions may be embedded in firmware, such as an EPROM. Itwill be further appreciated that hardware modules (or units or blocks)may be included in connected logic components, such as gates andflip-flops, and/or can be included in programmable units, such asprogrammable gate arrays or processors. The modules (or units or blocks)or computing device functionality described herein may be implemented assoftware modules (or units or blocks), but may be represented inhardware or firmware. In general, the modules (or units or blocks)described herein refer to logical modules (or units or blocks) that maybe combined with other modules (or units or blocks) or divided intosub-modules (or sub-units or sub-blocks) despite their physicalorganization or storage.

It will be understood that when a unit, an engine, a module, or a blockis referred to as being “on,” “connected to,” or “coupled to” anotherunit, engine, module, or block, it may be directly on, connected orcoupled to, or communicate with the other unit, engine, module, orblock, or an intervening unit, engine, module, or block may be present,unless the context clearly indicates otherwise. As used herein, the term“and/or” includes any and all combinations of one or more of theassociated listed items.

The terminology used herein is for the purposes of describing particularexamples and embodiments only and is not intended to be limiting. Asused herein, the singular forms “a,” “an,” and “the” may be intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “include” and/or“comprise,” when used in this disclosure, specify the presence ofintegers, devices, behaviors, stated features, steps, elements,operations, and/or components, but do not exclude the presence oraddition of one or more other integers, devices, behaviors, features,steps, elements, operations, components, and/or groups thereof.

In addition, it should be understood that in the description of thepresent disclosure, the terms “first”, “second”, or the like, are onlyused for the purpose of differentiation, and cannot be interpreted asindicating or implying relative importance, nor can be understood asindicating or implying the order.

The flowcharts used in the present disclosure illustrate operations thatsystems implement according to some embodiments of the presentdisclosure. It is to be expressly understood, the operations of theflowcharts may be implemented not in order. Conversely, the operationsmay be implemented in an inverted order, or simultaneously. Moreover,one or more other operations may be added to the flowcharts. One or moreoperations may be removed from the flowcharts.

FIG. 1 is a schematic diagram illustrating an exemplary process forvideo processing according to some embodiments of the presentdisclosure.

In some embodiments, a video processing system 100 may be applied to adigital image/video compression system, such as air televisionbroadcasting, cable television transmission, satellite televisiontransmission, such as an aerial TV broadcasting system, a cable TVtransmission system, a satellite TV transmission system, an Internetvideo transmission system, a digital video stored in media, or the like.As used herein, an image/video compression refers to a process ofreducing the amount of data required to present the digitalimages/videos. The purpose of the image/video compression may be toreduce redundant information in image/video data so as to store andtransmit data effectively.

As shown in FIG. 1 , the video processing system 100 may include asource signal 110, a source encoder 120, a channel 130, a source decoder140, and a decoded signal 150.

In some embodiments, the source signal 110 may include source imagedata. In some embodiments, the source image data may refer touncompressed original image data that has not been processed by adigital image editing and compression application. The source image datamay include one or more source images, a source video, etc. A sourceimage may include a video tape, a laser disk, a dynamic script, adigital image file, or the like. The source video may refer touncompressed dynamic images, and a storage format of the source videomay include a digital video format.

In some embodiments, the source encoder 120 may refer to a signalcompression standard completed by software and/or hardware applications.The source encoder 120 may be configured to compress a source signal(e.g., a source image, a source video) at a sending end to obtain anencoded source signal. In some embodiments, the source encoder 120 maypredict and encode the source signal. Specifically, the source encoder120 may predict, based on one or more previous source signals that havebeen encoded before a source signal, the source signal to obtain aprediction value of the source signal. Further, the source encoder 120may encode a difference between an actual value and the prediction valueof the source signal. In some embodiments, the prediction may include astring prediction (SP). More descriptions regarding the SP may be foundelsewhere in the present disclosure, for example, FIGS. 2A-2B andrelevant descriptions thereof.

In some embodiments, the video processing system 100 may further includea channel encoder. The channel encoder may refer to a device or programthat may further encode an encoded source signal before channeltransmission at the sending end. The channel encoder may be configuredto perform an error correction.

In some embodiments, the channel 130 may transmit or store encodedimage/video data. The channel 130 may include a wireless channel, awired channel, or a frequency band. The channel 130 may include atwisted pair, a cable, an optical fiber, or a medium that may propagateelectromagnetic waves.

In some embodiments, the encoded image data may be stored in a storagedevice (e.g., a hard disk), and the encoded image data may be read fromthe storage device during a subsequent decoding processing process.

In some embodiments, the video processing system 100 may include achannel decoder. The channel decoder may be configured at a receivingend to detect and correct an error in data transmission. The encodedsource signal may be unzipped by a source decoder 140.

In some embodiments, the source decoder 140 may refer to a signalcompression standard completed by software or hardware applications. Thesource decoder 140 may be configured to generate an approximation of thesource signal (e.g., a source image or a source video) in a decoding endfor playback. For example, the source decoder 140 may be configured toobtain an approximation of the source signal by decoding the encodedsource signal.

In some embodiments, the decoded signal 150 may refer to datareconstructed from the source signal 110 after being encoded anddecoded. The decoded signal 150 may include image data after beingcompressed and decompressed.

It should be noted that the above description is merely provided for thepurposes of illustration, and not intended to limit the scope of thepresent disclosure. For persons having ordinary skills in the art,multiple variations and modifications may be made under the teachings ofthe present disclosure. However, those variations and modifications donot depart from the scope of the present disclosure.

FIG. 2A is a schematic diagram illustrating an exemplary process fortraversing a current block according to some embodiments of the presentdisclosure.

FIG. 2B is a schematic diagram illustrating exemplary string predictionaccording to some embodiments of the present disclosure.

String prediction (SP) may refer to the prediction of severalconsecutive pixels in a current block (also referred to as an encodingunit or a current encoding unit). In some embodiments, a portion of thecurrent block may be a string (also referred to as a pixel string or acurrent string). In some embodiments, an entire current block may be astring. The string (e.g., the entire current block) may be predictedbased on a preset traversal order. As shown in FIG. 2A, the currentblock may be traversed for prediction in a bow shape from top to bottomwith a pixel located at an upper left corner of the current block as astarting point. It should be noted that the preset traversal order maybe set to other orders than the order shown in FIG. 2A, or set accordingto actual application scenarios, which may not be limited herein.

The SP may include an equal value string unit basis vector string(evs_ubvs) prediction pattern. The evs_ubvs prediction pattern maypredict a string by using frequently-occurring pixels or unit basisvectors. After a current block is predicted using the evs_ubvsprediction pattern, a string and/or a pixel in the obtained predictionblock corresponding to the current block may include an equal valuestring (evs), a unit basis vector string (ubvs), and/or an unmatchedpixel. The evs may refer to a string in which all pixels have a samevalue and are predicted based on a same frequently-occurring pixel. Theubvs may refer to a string that may be predicted based on a stringlocated above the string. The unmatched pixel may refer to a pixel inthe current block that does not belong to an evs or ubvs.

In some embodiments, previous frequently-occurring pixels obtained froma previous frequently-occurring pixel list (denoted as PreSrb) may befilled into an initial frequently-occurring pixel list (denoted as aninitial Srb) of a current block. Further, a clustering manner may beperformed on the initial Srb of the current block to obtain newfrequently-occurring pixels in the current block. The newfrequently-occurring pixels may be filled into the initial Srb of thecurrent block, and then a duplicate checking operation may be performedon the initial Srb of the current block. The initial Srb that has beenperformed the duplicate checking operation may be selected and sortedbased on a sum of squared error (SSE) to obtain a frequently-occurringpixel list (denoted as Srb) of the current block.

In some embodiments, for each (also referred to as a current pixel) ofpixels in the current block, a difference between the current pixel andeach of frequently-occurring pixels in the Srb corresponding to thecurrent block may be determined. A frequently-occurring pixel with asmallest difference may be selected from the frequently-occurring pixelsin the Srb as an optimal frequently-occurring pixel of the currentpixel.

In some embodiments, if the difference between the current pixel and theoptimal frequently-occurring pixel of the current pixel is greater thana threshold (denoted as i_errorlimit), a rate-distortion cost (RDcost)of directly encoding the current pixel may be determined. If therate-distortion cost is less than the difference between the currentpixel and the optimal frequently-occurring pixel of the current pixel(which indicates that differences between the current pixel and allfrequently-occurring pixels in the Srb of the current block are large),the direct encoding of the current pixel may save bit cost. In suchcases, the current pixel may be an unmatched pixel, that is, aprediction value of the current pixel may be a pixel value of thecurrent pixel. If the difference between the current pixel and theoptimal frequently-occurring pixel of the current pixel is not greaterthan the threshold or the rate-distortion cost of directly encoding thecurrent pixel is not less than the difference between the current pixeland the optimal frequently-occurring pixel of the current pixel, theprediction value of the current pixel may be a pixel value of theoptimal frequently-occurring pixel.

In some embodiments, an unmatched pixel string may be determined bytraversing pixels in the current block. In some embodiments, if a pixellocated at a starting position of the current block is an unmatchedpixel, the pixel may be added to a pixel string, and whether a nextpixel of the pixel is an unmatched pixel or not may be determined. Ifthe next pixel of the pixel is an unmatched pixel, the next pixel of thepixel may be added to the pixel string. Further, the above operation maybe repeated until a matched pixel appears, as a result, the pixel stringmay be obtained. On the basis, a candidate prediction string of thepixel string may include an unmatched pixel string composed of unmatchedpixels in the pixel string.

In some embodiments, a matched pixel string may be determined bytraversing the pixels in the current block. In some embodiments, if apixel located at a starting position of the current block is a matchedpixel that matches with a pixel A, the pixel located at the startingposition of the current block may be added to a pixel string, and afrequently-occurring pixel of the pixel located at the starting positionof the current block may be recorded as the pixel A. Further, whether afrequently-occurring pixel of a next pixel of the pixel matches with thepixel A may be determined. If the frequently-occurring pixel of the nextpixel matches with the pixel A, the next pixel may be added to the pixelstring. The above operation may be repeated until a frequently-occurringpixel of a pixel does not match with the pixel A, as a result, the pixelstring may be obtained. In addition, a length of the pixel string(denoted as srb_length) may be recorded. On the basis, a candidateprediction string of the pixel string may include an evs composed offrequently-occurring pixels of the pixel string.

Motion vectors of adjacent pixels may have a high correlation, so thateach of the motion vectors may be predicted based on a predictionvector. For example, a coordinate system may be constructed in thecurrent block with a current pixel as an origin. According to thecoordinate system, a vector expression of a prediction vector may be (0,−n), wherein n is a positive integer. The value of n may be setaccording to actual application scenarios, which may not be limitedherein. In some embodiments, for the pixel string determined above, acandidate prediction string of the pixel string may be predicted basedon a prediction vector of the pixel string. In some embodiments, theprediction vector may be selected from a plurality of preset vectors.Different preset vectors of the plurality of preset vectors mayrespectively point to pixels that are located in a preset direction ofthe pixel string and have different pixel row spacings from the pixelstring. In some embodiments, the plurality of preset vectors mayinclude, but not limited to (0, −1), (0, −2), (0, −3), . . . , (0, −n).In some embodiments, a certain count of prediction vectors may beselected from the plurality of preset vectors based on a size of thecurrent block. The certain count of prediction vectors may be positivelycorrelated with the size of the current block. That is, the larger thesize of the current block is, the greater the certain count ofprediction vectors may be.

In some embodiments, the plurality of preset vectors may be sorted basedon the pixel row spacing from small to large. The count (or number) ofthe plurality of preset vectors may be obtained by mapping the size ofthe current block based on a preset mapping relationship, and then apreset count of preset vectors with the highest ranking may be selectedfrom the plurality of sorted preset vectors as the prediction vectors,which may reduce a probability that the selected prediction vectorspoint to outside of the current block, thereby improving the accuracy ofthe selected prediction vectors.

As shown in FIG. 2B, strings evs1 and evs2 in a current block may bepredicted using two frequently-occurring pixels index0 and index1 in afrequently-occurring pixel list, respectively. Two twill blocks in athird pixel row 230 of the current block may be two unmatched pixelswhich may form an unmatched pixel string with a length of 2. A lastpixel row 240 of the current block may be a ubvs.

The frequently-occurring pixel list of the current block may include twokinds of pixels. As shown in FIG. 2B, the two kinds of pixels may berepresented by rectangles filled with different shadows, respectively.In a process of traversing the current block in a bow shape (as shown inFIG. 2A) from top to bottom, a pixel string (i.e., a pixel stringcomposed of four pixels in a first pixel row 210 of the current blockand a last pixel in a second pixel row 220 of the current block)including pixels that are represented by rectangles filled with pointsmay be obtained. A candidate string (also referred to as a candidateprediction string) of the pixel string may include a candidate stringwhose prediction string type is evs. A candidate string of evs may beevs1 composed of frequently-occurring pixels 0. Since the pixel stringis located at the first pixel row 210 of the current block, there may beno candidate string whose prediction string type is evs, so that theevs1 may be taken as the current string. In addition, a pixel string(i.e., a pixel string composed of three pixels in the second pixel row220 of the current block and two pixels in the third pixel row 230 ofthe current block) including pixels that are represented by rectanglesfilled with grid may be obtained. A candidate string of the pixel stringmay include a candidate string whose prediction string type is evs. Acandidate string of evs may be evs2 composed of frequently-occurringpixels 1. Since same frequently-occurring pixels do not exist above thepixel string, there may be no candidate string whose prediction stringtype is evs, so that evs2 may be taken as the current string. Inaddition, a pixel string (i.e., a pixel string composed of the last twopixels in the third pixel row 230 of the current block) including pixelsthat are represented by rectangles filled with slashes may be obtained.A candidate string of the pixel string may include a candidate stringwhose prediction string type is unmatched pixels. Since the last twopixels in the third pixel row 230 of the current block belongs tounmatched pixels, and there are no same pixels above the two pixels, thepixel string composed of the two pixels may be taken as the currentstring. That is, during encoding, the pixel string composed of the lasttwo pixels in the third pixel row 230 of the current block may bedirectly encoded. Since pixels in a fourth pixel row 240 of the currentblock are the same as pixels in the third pixel row 230 of the currentblock, when the pixels in the fourth row form a pixel string, acandidate string (also referred to as a ubvs candidate string) whoseprediction string type is ubvs may be predicted based on a predictionvector (0, −1), and a prediction cost may be the lowest in all candidatestrings, so that the ubvs candidate string may be taken as the currentstring.

According to the above embodiments, a pixel string in the current blockmay be determined and several candidate strings of the pixel string maybe obtained. The several candidate strings may include a candidatestring whose prediction string type is ubvs. The ubvs candidate stringmay be predicted based on the prediction vector that is selected fromthe plurality of preset vectors. A preset vector may point to the pixelsthat are located in the preset direction of the pixel string. The pixelspointed to by different preset vectors may have different pixel stringspacings from the pixel string. Further, a prediction string of thepixel string may be obtained based on prediction costs of the severalcandidate strings. In the process of SP, the prediction vector may beselected from the plurality of preset vectors, which may improve aselection range of the prediction vector compared with setting a singleprediction vector. As a result, the flexibility and accuracy of SP maybe improved, bit cost may be reduced, and the compression performance isimproved, that is, the prediction costs of the SP is reduced as much aspossible, which may be beneficial for improving the quality of videoencoding that is performed using the current string.

FIG. 3 is a flowchart illustrating an exemplary process for videoprocessing according to some embodiments of the present disclosure. Insome embodiments, the process 300 may be implemented by a videoprocessing system (e.g., a video processing system 500 illustrated inFIG. 5 ). In some embodiments, the video processing system may beimplemented by software and/or hardware, and/or may be integrated into avideo processing device that includes a processing device. In someembodiments, at least part of process 300 may be performed by theprocessing device including at least one processor and a storage device.For example, the process 300 may be stored in the storage device in theform of instructions (e.g., an application), and invoked and/or executedby the processing device. The operations of the illustrated processpresented below are intended to be illustrative. In some embodiments,the process 300 may be accomplished with one or more additionaloperations not described, and/or without one or more of the operationsdiscussed. Additionally, the order in which the operations of theprocess 300 as illustrated in FIG. 3 and described below is not intendedto be limiting.

In 310, a current string may be determined. In some embodiments,operation 310 may be implemented by a determination module 510.

In some embodiments, the current string may refer to several consecutivepixels in a current block.

In some embodiments, the current string may be determined by dividingthe current block in any manner. For example, the current string may bedetermined by dividing the current block based on textures and/or otherattributes of pixels in the current block. In some embodiments, adividing manner of the current block may include horizontal dividing.

In some embodiments, the current string may be determined by limiting alength of the current string being an integer multiple of a referencevalue (denoted as M). The reference value M may be a natural numberlarger than 1. In some embodiments, in order to facilitate hardwareimplementation, a video encoding system may limit pixel strings withdifferent lengths to the integer multiple of the reference value forencoding. In some embodiments, the current string may be determined byincreasing a length of the current string to the integer multiple of thereference value. In some embodiments, the current string may bedetermined based on a style of the current string. As described inconnection with FIGS. 2A-2B, the type of the current string may includeone of unmatched pixels, an equal value string (evs), and a unit basisvector string (ubvs). Specifically, if the type of the current string isthe unmatched pixels, the current string may be determined by increasingunmatched pixels in the current string. If the type of the currentstring is evs or ubvs, the current string may be determined by reducinga length of the evs or the ubvs to the integer multiple of the referencevalue. Exemplary processes A, B, and C for determining the currentstring may be described as follows.

Process A

If the length of the current string is not the integer multiple of thereference value M, the current string may be determined by increasingthe length of the current string to the integer multiple of thereference value M. For example, if M is 4 and the length of the currentstring is 7, the length of the current string may be increased to 8. Thetype of the increased pixels in the current string may be modified to bethe same as the type of the current string. The increasing the length ofthe current string may include traversing, in a bow shape (as shown inFIG. 2A) with a pixel located at an upper left corner of a current blockcorresponding to the current string as a starting point, pixels in thecurrent block, which may be implemented by the following operations311-333.

In operation 311, whether the type of the current string is a matchedstring or an unmatched string may be determined.

In some embodiments, if a pixel located at a starting position of thecurrent string is an unmatched pixel, the type of the current string maybe determined as the unmatched string. Further, whether a next pixel ofthe pixel is an unmatched pixel may be determined until a matched pixelis determined. In this case, whether the length of the current string isthe integer multiple of the reference value M may be determined. If thelength of the current string is the integer multiple of the referencevalue M, the length (denoted as srb_length) of the unmatched string maybe recorded, and operation 312 may be proceeded. If the length of thecurrent string is not the integer multiple of the reference value M, thedetermined matched pixel may be set as an unmatched pixel, and if pixellocated at the starting position of the current string is an unmatchedpixel, the type of the current string may be determined as the unmatchedstring may be repeated.

In some embodiments, if the pixel located at the starting position ofthe current string is a matched pixel, the type of the current stringmay be determined as an evs. A frequently-occurring pixel (denoted aspixel A) of the pixel located at the starting position of the currentstring may be recorded. Further, whether a frequently-occurring pixel ofa next pixel of the pixel located at the starting position of thecurrent string is equal to the pixel A may be determined until a certainpixel whose frequently-occurring pixel is not equal to the pixel A isdetermined. In this case, whether the length of the current string isthe integer multiple of the reference value M may be determined. If thelength of the current string is the integer multiple of the referencevalue M, a count of the pixels whose frequently-occurring pixels areequal to the pixel A may be recorded as the length (denoted assrb_length) of the evs, and operation 312 may be proceeded. If thelength of the current string is not the integer multiple of thereference value M, the frequently-occurring pixel of the certain pixelmay be set as pixel A, and the if the pixel located at the startingposition of the current string is a matched pixel, the type of thecurrent string may be determined as the evs may be repeated. It shouldbe noted that, in the present disclosure, a pixel is equal to anotherpixel means that a pixel value of the pixel is equal to a pixel value ofthe another pixel.

In operation 312, in response to determining that the current string isnot a matched string and an unmatched string, whether the type of thecurrent string is ubvs may be determined. If a position of a pixel to beprocessed is greater than or equal to a width of the current blockcorresponding to the current string and the type of a previous pixelstring of the current string is not ubvs, whether the type of thecurrent string is ubvs may be determined.

In some embodiments, if a frequently-occurring pixel of the pixel to beprocessed is equal to a frequently-occurring pixel of a pixel locatedabove the pixel to be processed, a further determination may beperformed, that is whether a frequently-occurring pixel of a next pixelof the pixel to be processed is the same as a frequently-occurring pixelof a pixel located above the next pixel may be determined until that afrequently-occurring pixel of a certain pixel is different from afrequently-occurring pixel of a pixel located above the certain pixel.In this case, whether the length of the current string is the integermultiple of the reference value M may be determined. If the length ofthe current string is the integer multiple of the reference value M, acount of the pixels whose frequently-occurring pixels are the same asthe frequently-occurring pixel of pixels located above the pixels may berecorded as a length of ubvs. Further, a total distortion may bedetermined, and operation 313 may be proceeded. If the length of thecurrent string is not the integer multiple of the reference value M, thefrequently-occurring pixel of the certain pixel may be set to be equalto the frequently-occurring pixel of the pixel located above the certainpixel, and if the frequently-occurring pixel of the pixel to beprocessed is equal to the frequently-occurring pixel of a pixel locatedabove the pixel to be processed, the further determination may beperformed may be repeated.

In some embodiments, if the frequently-occurring pixel of the pixel tobe processed is not equal to the frequently-occurring pixel of the pixellocated above the pixel to be processed, the current string may not be aubvs. The length of the ubvs may be 0. If the length of the ubvs isgreater than 0, a count of bits corresponding to the encoding of theubvs may be calculated.

In operation 313, the type of current string may be finally determined.

If the length of the ubvs is greater than 0, whether an average cost ofpixels in the ubvs is less than or equal to an average cost of pixels inthe evs or the unmatched string may be determined. If the average costof pixels in the ubvs is less than or equal to the average cost ofpixels in the evs or the unmatched string, the type of the currentstring may be determined as ubvs. If the average cost of pixels in theubvs is greater than the average cost of pixels in the evs or theunmatched string, the type of the current string may be determined asthe evs or the unmatched string.

Syntax modifications involved in the above exemplary process A forencoding evs_ubvs may be as shown in Table (1).

TABLE 1 Modified syntax descriptionpixel_duplication_count_shift2_minus1 This syntax indicates that alength of an evs is shifted by 2 bits to the right and then subtractedby 1. An actual encoding value in the present disclosure is(pixel_duplication_count_minus1 >> 2) − 1. str_length_shift2_minus1[i]This syntax indicates that a length of a ubvs is shifted by 2 bits tothe right and then subtracted by 1. An actual encoding value in thepresent disclosure is (str_length_minus1[i] >> 2) − 1.isc_unmatched_pixel_num_shift2_minus1 This syntax indicates that alength of an unmatched string is shifted by 2 bits to the right and thensubtracted by 1. An actual encoding value in the present disclosure is(isc_unmatched_pixel_num_minus1 >> 2) − 1.unmatched_pixel_max_length_shift2_minus1 This syntax indicates that amaximum value of a count of pixels in an unmatched string is shifted by2 bits to the right and then subtracted by 1. An actual encoding valuein the present disclosure is (unmatched_pixel_max_length_minus1 >> 2) −1.

Process B

If the length of the current string is not the integer multiple of thereference value M, the current string may be determined based on thetype of the current string, that is, different types of the currentstring may be processed by different ways, which may be implemented bythe following operations 321-323.

In operation 321, if a pixel located at the starting position of thecurrent string is an unmatched pixel, the current string is an unmatchedstring. Further, whether the next pixel of the pixel located at thestarting position of the current string is an unmatched pixel may bedetermined until a matched pixel is determined, and then whether thelength of the current string is the integer multiple of the referencevalue M may be determined. If the length of the current string is theinteger multiple of the reference value M, the length (denoted assrb_length) of the unmatched string may be recorded.

In operation 322, if the pixel located at the starting position of thecurrent string is a matched pixel, the current string is an evs.

In some embodiments, whether the frequently-occurring pixel of the nextpixel of the pixel located at the starting position of the currentstring is equal to the pixel A may be determined until the certain pixelwhose frequently-occurring pixel is not equal to the pixel A isdetermined. Further, whether the length of the current string is theinteger multiple of the reference value M may be determined. If thelength of the current string is the integer multiple of the referencevalue M, the count of the pixels whose frequently-occurring pixels areequal to the pixel A may be recorded as the length (denoted assrb_length) of evs.

In some embodiments, if the length of the current string is not theinteger multiple of the reference value M, the length (denoted assrb_length−srb_length % 4) of the current string may be decreased to theinteger multiple of the reference value M (e.g., 4). Further, the pixelsin the current block may be traversed in an anti-bow shape from acurrent position (i.e., a position of a last pixel in the current stringafter the length of the current string has been decreased), and thepixels (i.e., srb_length % 4) decreased from the current string that hasa count less than a multiple of 4 may be set as unmatched pixels. Thefrequently-occurring pixels of the unmatched pixels may be set asthemself. A subsequent pixel, in the traversal direction of the currentblock, of the pixels decreased from the current string may be processeduntil that a count of the subsequent pixel and the pixels decreased fromthe current string is the multiple of 4. When the count of thesubsequent pixel and the pixels decreased from the current string is themultiple of 4, whether the subsequent pixel is an unmatched pixel may bedetermined. If the subsequent pixel is an unmatched pixel, whethersubsequent pixels are an unmatched string may be determined.

In operation 323, when the current string is an ubvs, that is, thestarting position of the current string is has been determined as anubvs.

In some embodiments, as described in connection with the operation 311in exemplary process A, if a frequently-occurring pixel of a certainpixel at a certain position in the current string is different from afrequently-occurring pixel of a pixel located above the certainposition, whether the length of the current string is the integermultiple of the reference value M may be determined. If the length ofthe current string is the integer multiple of the reference value M, acount of the pixels whose frequently-occurring pixels are the same asthe frequently-occurring pixel of pixels located above the pixels may berecorded as a length (denoted as srb_above_length) of ubvs. Further, atotal distortion may be determined, and the determining of the currentstring may be ended.

In some embodiments, if the length of the current string is not theinteger multiple of the reference value M, the length (denoted assrb_above_length−srb_above _length% 4) of the current string may bedecreased to the integer multiple of the reference value M (e.g., 4).Further, the pixels in the current block may be traversed in an anti-bowshape from a current position (i.e., a position of a last pixel in thecurrent string after the length of the current string has beendecreased), and the pixels (i.e., srb_length % 4) decreased from thecurrent string that has a count less than a multiple of 4 may be set asunmatched pixels. The frequently-occurring pixels of the unmatchedpixels may be set as itself. A subsequent pixel, in the traversaldirection of the current block, of the pixels decreased from the currentstring may be processed until that a count of the subsequent pixel andthe pixels decreased from the current string is the multiple of 4. Whenthe count of the subsequent pixel and the pixels decreased from thecurrent string is the multiple of 4, whether the subsequent pixel is anunmatched pixel may be determined. If the subsequent pixel is anunmatched pixel, whether subsequent pixels are an unmatched string maybe determined.

Syntax modification involved in the above exemplary process B may be thesame as the syntax modification involved in the exemplary process A asshown in the above Table (1), which may not be repeated herein.

Process C

If the length of the current string is not the integer multiple of thereference value M, the current string may be determined by decreasingthe length of the current string to the integer multiple of thereference value M. The pixels decreased from the current string andsubsequent pixels of the pixels decreased from the current string mayform a pixel string with a fixed length of a multiple of M. Pixels or aportion of the pixels in the pixel string may be encoded based onoriginal types of the pixels or the portion of the pixels in the pixelstring.

In the process of evs_ubvs prediction, if the length of the currentstring is not the integer multiple of the reference value M, the lengthof the current string may be decreased to the integer multiple of thereference value M. The pixels decreased from the current string that hasa count less than a multiple of M may be supplemented by the subsequentpixels of the pixels decreased from the current string to form a mixedstring including M pixels. A length of the mixed string is M. The mixedstring may belong to a kind of unmatched string. Except for pixels witha ubvs type, others pixels in the mixed string may be saved and encodedbased on the original types of the others pixels. The pixels with a ubvstype may be encoded as unmatched pixels. Different types of the currentstring may be processed in different ways, which may be implemented bythe following operations 331-333.

In operation 331, when the current string is an unmatched pixel string.

In some embodiments, as described in connection with operation 311 inexemplary process A, the pixel located at the starting position of thecurrent string is an unmatched pixel. Further, whether the next pixel ofthe pixel located at the starting position of the current string is anunmatched pixel may be determined until a matched pixel is determined,and then whether the length of the current string is the integermultiple of the reference value M may be determined. If the length ofthe current string is the integer multiple of the reference value M, thelength (denoted as srb_length) of the unmatched string may be recorded.

In some embodiments, if the length of the current string is not theinteger multiple of the reference value M, the length (denoted assrb_length−srb_length % 4) of the current string may be decreased to theinteger multiple of the reference value M (e.g., 4). Further, the pixelsin the current block may be traversed in an anti-bow shape from acurrent position (i.e., a position of a last pixel in the current stringafter the length of the current string has been decreased), and thepixels (i.e., srb_length % 4) decreased from the current string that hasa count less than a multiple of 4 may be set as mixed type pixels. Asubsequent pixel, in the traversal direction of the current block, ofthe pixels decreased from the current string may be processed until thata length of the subsequent pixel and the pixels decreased from thecurrent string is M. In such cases, a type of each of the subsequentpixel and the pixels decreased from the current string may be recorded.

In operation 332, when the current string is an evs, that is, asdescribed in connection with the operation 311 in exemplary process A,the pixel located at the starting position of the current string is amatched pixel.

In some embodiments, whether the frequently-occurring pixel of the nextpixel of the pixel located at the starting position of the currentstring is equal to the pixel A may be determined until the certain pixelwhose frequently-occurring pixel is not equal to the pixel A isdetermined. Further, whether the length of the current string is theinteger multiple of the reference value M may be determined. If thelength of the current string is the integer multiple of the referencevalue M, the count of the pixels whose frequently-occurring pixels areequal to the pixel A may be recorded as the length (denoted assrb_length) of evs.

In some embodiments, if the length of the current string is not theinteger multiple of the reference value M, the length (denoted assrb_length−srb_length % 4) of the current string may be decreased to theinteger multiple of the reference value M (e.g., 4). Further, the pixelsin the current block may be traversed in an anti-bow shape from acurrent position (i.e., a position of a last pixel in the current stringafter the length of the current string has been decreased), and thepixels (i.e., srb_length % 4) decreased from the current string that hasa count less than a multiple of 4 may be set as mixed type pixels. Asubsequent pixel, in the traversal direction of the current block, ofthe pixels decreased from the current string may be processed until thata length of the subsequent pixel and the pixels decreased from thecurrent string is M. In such cases, a type of each of the subsequentpixel and the pixels decreased from the current string may be recorded.

In operation 333, when the current string is an ubvs, that is, thestarting position of the current string is has been determined as anubvs.

In some embodiments, as described in connection with the operation 312in exemplary process A, if a frequently-occurring pixel of a certainpixel at a certain position in the current string is different from afrequently-occurring pixel of a pixel located above the certainposition, whether the length of the current string is the integermultiple of the reference value M may be determined. If the length ofthe current string is the integer multiple of the reference value M, acount of the pixels whose frequently-occurring pixels are the same asthe frequently-occurring pixel of pixels located above the pixels may berecorded as a length (denoted as srb_above_length) of ubvs. Further, atotal distortion may be determined, and the determining of the currentstring may be ended.

In some embodiments, if the length of the current string is not theinteger multiple of the reference value M, the length (denoted as(srb_above_length−srb_above_length % 4)) of the current string may bedecreased to the integer multiple of the reference value M (e.g., 4).Further, the pixels in the current block may be traversed in an anti-bowshape from a current position (i.e., a position of a last pixel in thecurrent string after the length of the current string has beendecreased), and the pixels (i.e., srb_above_length % 4) decreased fromthe current string that has a count less than a multiple of 4 may be setas mixed type pixels. A subsequent pixel, in the traversal direction ofthe current block, of the pixels decreased from the current string maybe processed until that a length of the subsequent pixel and the pixelsdecreased from the current string is M. In such cases, a type of each ofthe subsequent pixel and the pixels decreased from the current stringmay be recorded. It should be noted that the pixels with a ubvs type maybe encoded as unmatched pixels.

It should be noted that syntax modification involved in the aboveexemplary process C for encoding the unmatched string, the evs, and theubvs may be the same as the syntax modification involved in theexemplary process A as shown in the above Table (1), which may not berepeated herein.

Further, in the exemplary process C, if the current string is anunmatched string, a relevant syntax may need to be set to indicaterelevant information of the mixed string.

In some embodiments, the mixed string may be an unmatched string. Inorder to distinguish the mixed string from ordinary unmatched strings, asyntax “isc_mixeded_pixel_str_present_flag” may need to be transmittedto indicate that the type of the unmatched string is a mixed string.

In some embodiments, if “isc_mixeded_pixel_str_present_flag” is 1, alength of the mixed string may not need to be transmitted, and thelength of the mixed string may be fixed to 4 pixels. Each of the 4pixels may have a match flag, for example, “match_flag [i]”, wherein imay be equal to 0, 1, 2, or 3. If i=1, the pixel corresponding to the“match_flag [1]” may be an evs pixel, and “pv_address” may need to betransmitted. If i is equal to 0, the pixel corresponding to the“match_flag” [0] may be an unmatched string, and Y, U, and V componentsof the pixel may need to be transmitted.

In some embodiments, if “isc_mixeded_pixel_str_present_flag” is 0, thelength of the mixed string and the Y, U, and V components of each pixelin the mixed string may be encoded in a way of encoding an unmatchedstring.

In some embodiments, the mixed string in the above exemplary process Cmay be processed as an independent string type, and each mixed stringmay need to be added the syntax “isc_mixeded_pixel_str_present_flag” todistinguish the mixed string from other strings.

In the present disclosure, the current string may be determined bysetting the length of the current string being the integer multiple ofthe reference value, which may reduce the complexity of hardwareimplementation of the video encoding. Further, the lengths of differentpixel strings in the present disclosure may be multiples of M, as aresult, in actual encoding, the length of each pixel string may beencoded by encoding a value of the length divided by M, which mayeffectively reduce the count of bits of the encoding.

In 320, a first cost may be determined based on pixels with a same pixelvalue in the current string. In some embodiments, operation 320 may beimplemented based on a first cost determination module 520.

In some embodiments, the pixels with the same pixel value in the currentstring may include all or a portion of pixels in the current string. Forexample, if pixel values of several consecutive pixels (e.g., 8) in thecurrent string are the same, the several consecutive pixels may beconsidered as the pixels with the same pixel value in the currentstring.

In some embodiments, the first cost may refer to a cost corresponding tothe smallest of differences between frequently-occurring pixels and thepixels with the same pixel value in the current string. Specifically,for each of the pixels with the same pixel value in the current string,differences each of which is between the pixel and each offrequently-occurring pixels in a frequently-occurring pixel candidatelist may be determined. The smallest difference among the differencescorresponding to the pixels with the same pixel value in the currentstring may be determined as the first cost.

In 330, a second cost may be determined based on one or more stringsthat are located above the current string. In some embodiments,operation 330 may be implemented based on a second cost determinationmodule 530.

In some embodiments, the one or more strings that are located above thecurrent string may include a string located directly above the currentstring and adjacent to the current string and a string located directlyabove the current string and separated from the current string by one ormore pixel rows. For example, the one or more strings may include astring located directly above the current string and separated from thecurrent string by 1 pixel row. As another example, the one or morestrings may include a string located directly above the current stringand separated from the current string by 2 pixel rows.

In some embodiments, a count of the one or more strings may be largerthan 1. For example, the count of the one or more strings may be alogarithm of a height of a current block corresponding to the currentstring with a base of 2.

In some embodiments, a size of the current block may include the heightof the current block. A preset mapping relationship, for example, amultiple linear relationship, between the height of the current blockand a preset count of a plurality of preset vectors may be determined.For example, the plurality of preset vectors may be sorted in ascendingorder of pixel row spacing, for example, (0, −1), (0, −2), and (0, −3).Different height ranges where the height of the current block maycorrespond to different counts of present vectors of the current block.Different height ranges may be set, for example, a height range beingsmaller than T1, a height range from T1 to T2, and a height rangeexceeding T2. The height range being smaller than T1 may correspond to apreset count 1, that is if the height of the current block is in theheight range being smaller than T1, the preset count of the plurality ofpreset vectors may be determined as 1. Accordingly, the preset vector(0, −1) may be determined as a prediction vector of the current block.The height range from T1 to T2 may correspond to a preset count 2, thatis if the height of the current block is in the height range from T1 toT2, the preset count of the plurality of preset vectors may bedetermined as 2. Accordingly, the preset vectors (0, −1) and (0, −2) maybe determined as prediction vectors of the current block. The heightrange exceeding T2 may correspond to a preset count 3, that is if theheight of the current block is in the height range exceeding T2, thepreset count of the plurality of preset vectors may be determined as 3.Accordingly, the preset vectors (0, −1), (0, −2), and (0, −3) may bedetermined as prediction vectors of the current block.

In some embodiments, the preset mapping relationship between the heightof the current block and the preset count of the plurality of presetvectors may include a logarithmic relationship (i.e., a nonlinearrelationship). For example, the preset mapping relationship may beexpressed as k=log₂height, wherein k represents the preset count of theplurality of preset vectors, and height represents the height of thecurrent block. When the preset mapping relationship is expressed asother nonlinear relationships, the preset count k may be greater than anactual count of the plurality of preset vectors. In this case, thepreset count k may be set equal to the count of the plurality of presetvectors, that is, all preset vectors may be selected as the predictionvectors of the current block.

In some embodiments, the second cost may be determined based on the oneor more strings that are located above the current string. For example,the second cost may be determined based on single one pixel string thatis located above the current string. In some embodiments, the currentstring and the one or more strings may be compared. According to thecomparison, a target string may be determined from the one or morestrings. Further, a cost of the target string may be designated as thesecond cost. Specifically, the second cost may refer to a minimumprediction cost. A ubvs prediction may be performed on a certain countof strings that are located above the current string based on theprediction vectors of the certain count (denoted as X) of strings. Theprediction costs corresponding to the certain count of strings that arelocated above the current string may be compared, and an i-th string maybe selected from the certain count of strings as a target string fromthe certain count of strings, wherein 1≤i≤X and a prediction cost of thei-th string may be a string with a smallest prediction cost among thecertain count (denoted as X) of strings. The prediction cost of a stringmay be determined based on rate-distortion costs of pixels in thestring. Specifically, an average value of the rate-distortion costs ofthe pixels in the string may be determined as the prediction cost of thestring.

In 340, a prediction string of the current string may be determinedbased on the first cost and the second cost. In some embodiments,operation 340 may be implemented by a prediction module 540.

In some embodiments, the first cost and the second cost may be compared.According to the comparison, the prediction string of the current stringmay be determined. Specifically, a string corresponding to the smallerof the first cost and the second cost may be selected as the predictionstring of the current string.

In some embodiments, strings that have been predicted in the currentblock may be adjusted. Specifically, two adjacent strings in the currentblock among the strings that have been predicted in the current blockand satisfy a condition may be designated as a pair of target strings.The condition may include that prediction strings of the adjacentstrings do not include an unmatched string. For example, the conditionmay include that the prediction strings of the adjacent strings includea ubvs and an evs. As another example, the condition may include thatthe prediction strings of the adjacent strings both are ubvs.

Further, one or more fusion prediction strings may be determined byfusing the pair of target strings based on prediction strings of thepair of target strings and a fusion degree. The fusion degree mayinclude complete fusion and/or incomplete fusion. It should be notedthat under the incomplete fusion, a pair of target pixel strings may befused to obtain two fusion prediction strings. Under the completefusion, a pair of target pixel strings may be fused to obtain one fusionprediction string. Specifically, in response to types of the predictionstrings of the pair of target strings being the same, one fusionprediction string may be determined by fusing the pair of target stringsbased on the complete fusion. In response to types of the predictionstrings of the pair of target strings being different, two fusionprediction strings may be determined by fusing the pair of targetstrings based on the incomplete fusion.

The above fusion operation may improve the flexibility and accuracy ofSP, reduce bit cost, and improve compression performance. Further, oneor more target prediction strings of the pair of target strings may bedetermined based on prediction costs of the prediction strings of thepair of target strings and prediction costs of the one or more fusionprediction strings, thereby optimizing a prediction result of SP andimproving the quality of the video encoding.

In some embodiments, during the incomplete fusion of the pair of targetstrings, one of the two adjacent strings may be used as a referencepixel string and the other of the two adjacent strings may be used as atransfer pixel string. As used herein, the reference pixel string mayrefer to a pixel string used as a reference for fusion of the twoadjacent strings. A portion of consecutive pixels in the transfer pixelstring close to the reference pixel string may be transferred to thereference pixel string, so that a fusion pixel string (also referred toas a first fusion pixel string) corresponding to the reference pixelstring and a fusion pixel string (also referred to as a second fusionpixel string) corresponding to the transfer pixel string may beobtained. A type of a fusion prediction string (also referred to as afirst fusion prediction string) of the first fusion pixel stringcorresponding to the reference pixel string may be the same as a type ofa prediction string of the reference pixel string. A type of a fusionprediction string (also referred to as a second fusion predictionstring) of the second fusion pixel string corresponding to the transferpixel string may be the same as a type of a prediction string of thetransfer pixel string. For example, a target pixel string 1 and a targetpixel string 2 may be a pair of target strings. A prediction string ofthe target pixel string 1 is evs. A prediction string of the targetpixel string 2 is ubvs. The target pixel string 1 may be used as atransfer pixel string and the target pixel string 2 may be used as areference pixel string. In such cases, a portion of consecutive pixelsin the target pixel string 1 and close to the target pixel string 2 maybe transferred to the target pixel string 2 to obtain a fusion pixelstring A corresponding to the target pixel string 1 and a fusion pixelstring B corresponding to the target pixel string 2. A length of thefusion pixel string A may be smaller compared with the target pixelstring 1. A length of the fusion pixel string B may be greater comparedwith the target pixel string 2. A fusion prediction string of the fusionpixel string A may be still evs. A fusion prediction string of thefusion pixel string B may be still ubvs. Similarly, when the predictionstrings of the target pixel string 1 and the target pixel string 2 areubvs, the fusion prediction strings of the fusion pixel string Acorresponding to the target pixel string 1 and the fusion pixel string Bcorresponding to the target pixel string 2 may be still ubvs.

In some embodiments, during the complete fusion of the pair of targetstrings, all pixels in the transfer pixel string may be transferred tothe reference pixel string, and the pair of target pixel strings may befused to obtain one fusion pixel string. The type of the fusionprediction string of the fusion pixel string may be the same as the typeof the prediction string of the reference pixel string. For example, allpixels in the target pixel string 1 may be transferred to the targetpixel string 2 to obtain a fusion pixel string C. A length of the fusionpixel string C may be equal to the length of the target pixel string 1plus the length of the target pixel string 2. A fusion prediction stringof the fusion pixel string C and the prediction string of the referencepixel string may be ubvs. Similarly, when the prediction strings of thetarget pixel string 1 and the target pixel string 2 are ubvs, the fusionprediction string of the fusion pixel string C may be ubvs.

In some embodiments, one or more target prediction strings of the pairof target strings may be determined based on prediction costs of theprediction strings of the pair of target strings and prediction costs ofthe one or more fusion prediction strings. For example, a predictionstring (e.g., one of the prediction strings of the pair of targetstrings or one of the one or more fusion prediction strings) with alowest rate-distortion cost may be determined as a target predictionstring.

For example, the target pixel string 1 and the target pixel string 2 maybe a pair of target strings. The prediction string of the target pixelstring 1 is evs. The prediction string of the target pixel string 2 isubvs. The target pixel string 1 and the target pixel string 2 may beincompletely fused to obtain the fusion prediction string A of thefusion pixel string A and the fusion prediction string B of the fusionpixel string B. Further, a first prediction cost of the predictionstring of the target pixel string 1 and a second prediction cost of theprediction string of the target pixel string 2 may be obtained. A firstsum of the first prediction cost and the second prediction cost may beobtained. In addition, a third prediction cost of the fusion predictionstring A and a fourth prediction cost of the fusion prediction string Bmay be obtained. A second sum of the third prediction cost and thefourth prediction cost may be obtained. The first sum and the second summay be compared. If the first sum is less than the second sum, theprediction strings of the target pixel string 1 and the target pixelstring 2 may be designated as the target prediction strings. If thefirst sum is greater than or equal to the second sum, the fusionprediction string A and the fusion prediction string B may be designatedas the target prediction strings.

As another example, the target pixel string 1 and the target pixelstring 2 may be completely fused to obtain the fusion prediction stringC of the fusion pixel string C. Further, a fifth prediction cost of thefusion prediction string C of fusion pixel string C may be obtained. Thefifth prediction cost may be compared with the first sum. If the firstsum is less than the fifth prediction cost, the prediction strings ofthe target pixel string 1 and the target pixel string 2 may bedesignated as the target prediction strings. If the sum is greater thanor equal to the fifth prediction cost, the fusion prediction string C ofthe fusion pixel string C may be designated as the target predictionstring. More descriptions regarding the fusion of the pair of targetstrings may be found elsewhere in the present disclosure, for example,FIGS. 4A-4D and relevant descriptions thereof.

FIG. 4A is a flowchart illustrating an exemplary fusion process of apair of target strings according to some embodiments of the presentdisclosure. In some embodiments, a pair of target strings may include areference pixel string and a transfer pixel string. Starting from apixel in the transfer pixel string closest to the reference pixelstring, except for a pixel in the transfer pixel string furthest fromthe reference pixel string, other pixels in the transfer pixel stringmay be transferred to the reference pixel string one by one andpredicted based on a prediction vector of a prediction string of thereference pixel string, which is equivalent to continuously increasing alength of the reference pixel string while continuously reducing alength of the transfer pixel string.

In some embodiments, the pair of target strings may include two ubvs.One of the two ubvs may be used as the reference pixel string and theother of the two ubvs may be used as the transfer pixel string.

As shown in FIG. 4A, ubvs1 and ubvs2 may be a pair of target strings.The ubvs1 may be used as a reference pixel string including 3 pixels,and the ubvs2 may be used as a transfer pixel string including 3 pixels.A pixel M in the ubvs2 closest to the ubvs1 may be transferred to theubvs1 , so that a length of the ubvs1 may be changed from 3 to 4, and alength of the ubvs2 may be changed from 3 to 2. As a result, a new ubvs1(i.e., a fusion pixel string 1) and a new ubvs2 (i.e., a fusion pixelstring 2) are obtained. A prediction vector of a prediction string ofthe ubvs1 (also referred to as previous ubvs1) or the new ubvs1 may be(0, −2), and a prediction vector of a prediction string of the ubvs2(also referred to as previous ubvs2) or the new ubvs2 may be (0, −1). Itshould be noted that arrows in the current block in FIGS. 4A-D mayindicate directions of prediction vectors. Therefore, the pixel M may bepredicted by the prediction vector (0, −1) before being transferred, andbe predicted by the prediction vector (0, −2) after being transferred. Afusion prediction string of the fusion pixel string 2 may be determinedbased on the prediction vector (0, −1), and a fusion prediction stringof the fusion pixel string 1 may be determined based on the predictionvector (0, −2).

As another example, the previous ubvs2 may be used as the referencepixel string and the previous ubvs1 may be used as the transfer pixelstring. A pixel N in the previous ubvs1 closest to the ubvs2 may betransferred to the ubvs2, so that the length of the previous ubvs2 maybe changed from 3 to 4, and the length of previous ubvs1 may be changedfrom 3 to 2. As a result, a new ubvs1 (i.e., a fusion pixel string 3)and a new ubvs2 (i.e., a fusion pixel string 4) are obtained. Theprediction vector of the prediction string of the previous ubvs1 or thenew ubvs1 may be (0, −2), and the prediction vector of the predictionstring of the previous ubvs2 or the new ubvs2 may be (0, −1). Therefore,the pixel N may be predicted by the prediction vector (0, −2) beforebeing transferred, and be predicted by the prediction vector (0, −1)after being transferred. A fusion prediction string of the fusion pixelstring 4 may be determined based on the prediction vector (0, −1), and afusion prediction string of the fusion pixel string 3 may be determinedbased on the prediction vector (0, −2).

FIG. 4B is a flowchart illustrating an exemplary fusion process of apair of target strings according to some embodiments of the presentdisclosure. In some embodiments, all pixels in the transfer pixel stringmay be transferred to the reference pixel string (i.e., completefusion), so that the transfer pixel string and the reference pixelstring may be combined to obtain a new pixel string (i.e., a fusionpixel string). The new pixel string may be predicted based on theprediction vector of the prediction string of the reference pixel stringto obtain a fusion prediction string of the fusion pixel string.

As shown in FIG. 4B, ubvs3 and ubvs4 may be a pair of target strings.For example, the ubvs3 may be used as a reference pixel string and theubvs4 may be used as a transfer pixel string, all pixels in the ubvs4may be transferred to the ubvs3, so that the ubvs3 and the ubvs4 may becombined to obtain a new ubvs (i.e., a fusion pixel string 5) with alength of 4. A prediction vector of a prediction string of the ubvs3 maybe used to predict the new ubvs (i.e., the fusion pixel string 5) toobtain a fusion prediction string of the fusion pixel string 5.Specifically, the prediction vector of the prediction string of theubvs3 may be (0, −2), and a prediction vector of a prediction string ofthe ubvs4 may be (0, −1). The fusion prediction string of the fusionpixel string 5 may be determined based on pixels pointed by theprediction vector (0, −2).

As another example, the ubvs4 may be used as the reference pixel stringand the ubvs3 may be used as the transfer pixel string, all pixels inthe ubvs3 may be transferred to the ubvs4, so that the ubvs4 and theubvs3 may be combined to obtain a new ubvs (i.e., a fusion pixel string6) with a length of 4. The prediction vector of the prediction string ofthe ubvs4 may be used to predict the new ubvs to obtain the fusionprediction string of the fusion pixel string 6. Specifically, theprediction vector of the prediction string of the ubvs3 may be (0, −2),and the prediction vector of the prediction string of the ubvs4 may be(0, −1). The fusion prediction string of the fusion pixel string 6 maybe determined based on pixels pointed by the prediction vector (0, −1).

In some embodiments, when the prediction vector of the prediction stringof ubvs3 and the prediction vector of the prediction string of ubvs4 arethe same, ubvs3 and ubvs4 may be directly combined to obtain a fusionpixel string with a length of a length sum of the ubvs3 and ubvs4. Thefusion pixel string may be predicted by the prediction vector of theprediction string of the ubvs1 or the ubvs2. A fusion prediction stringof the fusion pixel string may be determined based on pixels pointed bythe prediction vector of the prediction string of the ubvs1 or theubvs2.

FIG. 4C is a flowchart illustrating an exemplary fusion process of apair of target strings according to some embodiments of the presentdisclosure. In some embodiments, the pair of target strings may includeubvs and evs, that is, one of the pair of target pixel strings may beubvs and the other of the pair of target pixel strings may be evs. Aprediction string of the evs may include pixels with a same preset pixelvalue.

As shown in FIG. 4C, ubvs5 and evs1 may be a pair of target strings. Theubvs5 may be used as a reference pixel string including 4 pixels, andthe evs1 may be used as a transfer pixel string including 3 pixels. Apixel O in the evs1 closest to the ubvs5 may be transferred to theubvs5, so that a length of the ubvs5 may be changed from 4 to 5, and alength of the evs1 may be changed from 3 to 2. As a result, a new ubvs5(i.e., a fusion pixel string 7) and a new evs1 (i.e., a fusion pixelstring 8) are obtained. A prediction vector of a prediction string ofthe ubvs5 (also referred to as previous ubvs5) or the new ubvs5 may be(0, −2). A fusion prediction string of the fusion pixel string 7 may bedetermined based on pixels pointed by the prediction vector (0, −2). Afusion prediction string of the fusion pixel string 8 may be determinedbased on preset pixel values of a prediction string of the evs1.Further, a next pixel P in the evs1 may be transferred to the new ubvs5,so that a length of the new ubvs5 may be changed from 5 to 6, and alength of the new evs1 may be changed from 2 to 1. As a result, a fusionpixel string 9 and a fusion pixel string 10 are obtained. A fusionprediction string of the fusion pixel string 9 may be determined basedon the pixels pointed by the prediction vector (0, −2). A fusionprediction string of the fusion pixel string 10 may be determined basedon the preset pixel values of the prediction string of the evs1.

FIG. 4D is a flowchart illustrating an exemplary fusion process of apair of target strings according to some embodiments of the presentdisclosure.

As shown in FIG. 4D, all pixels in the evs1 may be transferred to theubvs5, so that the ubvs5 and the evs1 may be combined to obtain a newubvs (i.e., a fusion pixel string 12) with a length of 7. The predictionvector of the prediction string of the ubvs5 may be used to predict thenew ubvs (i.e., the fusion pixel string 12) to obtain a fusionprediction string of the fusion pixel string 12. Specifically, theprediction vector of the prediction string of the ubvs5 may be (0, −2),and the fusion prediction string of the fusion pixel string 12 may bedetermined based on pixels pointed by the prediction vector (0, −2).

In some embodiments, the evs1 may be used as the reference pixel string,and the ubvs5 may be used as the transfer pixel string. Starting from apixel in the ubvs5 closest to the evs1, except for a pixel in the ubvs5furthest from the evs1, other pixels in the ubvs5 may be transferred tothe evs1 one by one and predicted based on the prediction vector of theprediction string of the evs1, which is equivalent to continuouslyincreasing a length of the evs1 while continuously reducing a length ofthe ubvs5. In some embodiments, as shown in FIG. 4D, all pixels in theubvs5 may be transferred to the evs1, so that the ubvs5 and the evs1 maybe combined to obtain a new ubvs (i.e., a fusion pixel string 11) with alength of 7. The preset pixel values of the prediction string of theevs1 may be used to predict the new ubvs (i.e., the fusion pixel string11) to obtain a fusion prediction string of the fusion pixel string 11.

In some embodiments, the pair of target strings may include two evs. Oneof the two evs may be used as the reference pixel string and the otherof the two evs may be used as the transfer pixel string. The predictionstring of the evs may include pixels with a same preset pixel value. Allpixels in the transfer pixel string may be transferred to the referencepixel string, so that the two evs may be combined into an ubvs that ispredicted based on different prediction vectors.

In the above embodiments, one of the pair of target strings is used asthe reference pixel string and the other of the pair of target stringsis used as the transfer pixel string. According to the fusion degree,several continuous pixels in the transfer pixel string close to thereference pixel string may be transferred to the reference pixel string.After the pixels are transferred, the reference pixel string may bedesignated as the first fusion pixel string, and the transfer pixelstring may be designated as the second fusion pixel string. Further, thefusion prediction string of the first fusion pixel string may bedetermined based on a type of the prediction string of the predictionstring of the reference pixel string, and the fusion prediction stringof the second fusion pixel string may be determined based on a type ofthe prediction string of the transfer pixel string, which may improvethe flexibility of the fusing of the pair of target strings and increasecounts of fusion pixel strings and fusion prediction strings, therebyimproving the accuracy of the subsequently determined target predictionstring, reducing the bit cost, and improving the compressionperformance. As a result, the quality of subsequent video coding may beimproved.

In some embodiments, an encoded block of the current block may beobtained, and then the encoded block may be decoded and reconstructedbased on a type of a prediction string of a target prediction string inthe encoded block.

In some embodiments, a syntax element expression may be obtained basedon the target prediction string, and then the current block may beencoded based on the syntax element expression to obtain the encodedblock of the current block. In some embodiments, if types of theprediction strings of a plurality of continuous target predictionstrings in the current block is ubvs (that is, the plurality ofcontinuous target prediction strings in the current block are ubvs), thesyntax element expression may include a first syntax element, a secondsyntax element, and a third syntax element. The first syntax element mayindicate prediction vectors of the target prediction strings whose typesare ubvs. For the purposes of illustration, the first syntax element maybe denoted as “ubvs_type”. For example, in the case that preset vectorsincludes, but not limited to, (0, −1), (0, −2), (0, −3) . . . (0, −n),if the prediction vectors of the target prediction strings are (0, −1),the first syntax element “ubvs_type” may be set to 0. Similarly, if theprediction vectors of the target prediction strings are (0, −2), thefirst syntax element “ubvs_type” may be set to 1. The second syntaxelement may indicate a count of the consecutive target predictionstrings in the current block. For the purposes of illustration, thesecond syntax element may be denoted as “run_num”. The third syntaxelement may indicate the types of the prediction strings of theplurality of continuous target prediction strings in the current block.For the purposes of illustration, the third syntax element may bedenoted as “is_evs_run”. For example, when the types of the predictionstrings of the plurality of consecutive target prediction strings in thecurrent block are ubvs, the third syntax element may be set to 0 toindicate that the second syntax element “run_mum” indicates the count ofconsecutive ubvs.

In some embodiments, if that the types of the prediction strings of theplurality of continuous target prediction strings are ubvs is notallowed (that is, continuous ubvs are not allowed) (e.g., a plurality ofcontinuous evs), the syntax element expression may include a firstsyntax element and a second syntax element. The first syntax element mayindicate the prediction vectors of the target prediction strings whosetype is ubvs. The second syntax element may indicate a count of theplurality of continuous target prediction strings whose types are notubvs (e.g., the plurality of continuous evs).

In some embodiments, the syntax element expression may include a modesyntax element that indicates a selected prediction pattern. For thepurposes of illustration, the mode syntax element may be denoted as“isc_cu_evs_ubvs_submode_flag”. The mode syntax element may indicatewhether the determined prediction pattern is an ordinary string matchingprediction pattern (also referred to as an ordinary string predictionpattern) or the evs_ubvs prediction pattern.

In some embodiments, for the current block, the syntax elementexpression may include a first matched string syntax element and asecond matched string syntax element. The first matched string syntaxelement may indicate whether there is an evs in the current block. Forthe purposes of illustration, the first matched string syntax elementmay be denoted as “isc_evs_present_flag”. The second matched stringsyntax element may indicate whether there is an unmatched string in thecurrent block. For the purposes of illustration, the second matchedstring syntax element may be denoted as“isc_unmatched_pixel_str_present_flag”.

In some embodiments, for the current string, for example, a ubvs, thesyntax element expression may be set according to whether the continuousubvs are allowed.

In some embodiments, for the current string (e.g., an evs), the syntaxelement expression may be set based on an index of afrequently-occurring pixel in the frequently-occurring pixel listcorresponding to the evs and a length of the evs. Specifically, thelength of the evs may be indicated by a syntax element“pixel_duplication_count_minus1”. The syntax element“pixel_duplication_count_minus1” may indicate that the length of the evsminus 1. For example, if the length of the evs is 1, the syntax element“pixel_duplication_count_minus1” may be set to 0. If the length of theevs is 2, the syntax element “pixel_duplication_count_minus1” may be setto 1.

In some embodiments, for the current string (e.g., an unmatched string),the syntax element expression may be set according to pixel values ofunmatched pixels in the unmatched string and a count of consecutiveunmatched pixels in the unmatched string. Specifically, a length of theunmatched string may be indicated by a syntax element“isc_unmatched_pixel_num_minus1” and a syntax element“unmatched_pixel_max_length_minus1”. The syntax element“isc_unmatched_pixel_num_minus1” may indicate that the length of theunmatched string minus 1. The syntax element“unmatched_pixel_max_length_minus1” may indicate that a maximum of thecount of pixels in the unmatched string minus 1.

After the above syntax element expressions are obtained, the currentblock may be encoded based on the syntax element expressions to obtainthe encoded block.

In some embodiments, if the type of the prediction string of the targetprediction string is the evs, the target prediction string may bedecoded and reconstructed directly. Specifically, the target predictionstring may be decoded and reconstructed based on the syntax elementcorresponding to the target prediction string. For example, the lengthof the evs may be obtained based on the syntax element“pixel_duplication_count_minus1”, and a pixel value of each pixel in theevs may be obtained based on a syntax element index.

In some embodiments, when the type of the prediction string of thetarget prediction string is the ubvs, a pixel row spacing correspondingto the prediction vector of the target prediction string and a count ofpixel rows occupied by the target prediction string may be obtained. Insuch cases, several sub prediction strings of the target predictionstring may be decoded and reconstructed in turn. In above way, when thetype of the prediction string of the target prediction string is theubvs and the count of pixel rows occupied by the target predictionstring is greater than the pixel row spacing corresponding to theprediction vector of the target prediction string, the direct decodingof the target prediction string may result in that the decoding ofpixels in the lower rows may refer to pixels in the upper rows in thecurrent string. However, during the hardware circuit processing, thereferenced pixels (e.g., the pixels in the upper rows) may not be ableto complete decoding and reconstruction in time, which may not beconducive to the hardware implementation and affect decoding efficiency.Therefore, the target prediction string may be divided into the severalsub prediction strings, and the count of pixel rows occupied by each subprediction string may not be greater than the pixel row spacing. On thisbasis, the several sub prediction strings are decoded and reconstructedin turn, which is conducive to improving the decoding efficiency.

For example, the count of the pixel rows occupied by the ubvs is m, andthe prediction vector corresponding to the ubvs is (0, −n) (that is, thecorresponding pixel row spacing is n). If m exceeds n, the ubvs with mrows may be divided every n rows, so that ceil (m/n) sub predictionstrings may be obtained by the dividing, wherein ceil indicates that m/nis increased to an integer when being a non-integer. Further, during thedecoding and reconstruction, the sub prediction strings may be decodedand reconstructed in turn.

As another example, the count of the pixel rows occupied by the ubvs is4, and the prediction vector corresponding to the ubvs is (0, −3) (thatis, the corresponding pixel row spacing is 3). Therefore, the ubvs maybe divided into 2 sub prediction strings (e.g., a first sub predictionstring and a second sub prediction string). The first sub predictionstring may occupy the first three rows of the ubvs, that is, a count ofpixel rows in the first sub prediction string is 3. The second subprediction string may occupy a last line of the ubvs, that is, a countof pixel rows in the second sub prediction string is 1. During thedecoding and reconstruction, the first sub prediction string may bedecoded and reconstructed first, and then the second sub predictionstring may be decoded and reconstructed.

In some embodiments, the current string may be encoded based on the typeof the current string and the frequently-occurring pixel list to obtaina code stream of the current block. Specifically, related syntaxelements may be set. For example, the syntax element“isc_cu_evs_ubvs_submode_flag” may be transmitted to indicate thatwhether the evs_ubvs prediction pattern or the ordinary SP predictionpattern is used to predict. Further, a syntax element may be transmittedto indicate that whether the current string is evs, unmatched pixels, orubvs. For the current block, a syntax element “isc_evs_present_flag” maybe transmitted to indicate whether there is an evs in the current block,and then a syntax element “isc_unmatched_pixel_str_present_flag” may betransmitted to indicate whether there are unmatched pixels in thecurrent block. For the current string, if the current string is an evs,an index of a frequently-occurring pixel corresponding to the evs in aSrb list and a length of the current string may be transmitted. Thelength of the current string may involve a syntax element“pixel_duplication_count_minus1”. If the frequently-occurring pixelcorresponding to the evs is a new frequently-occurring pixel, a pixelvalue of the new frequently-occurring pixel may be transmitted. If thecurrent string is an ubvs, a syntax element may be needed to indicate acount of continuous evs or unmatched strings. If the count is 0, thecurrent string may be neither evs nor unmatched string, that is, thecurrent string may be an ubvs. In such cases, a length of the ubvs maybe transmitted. The length of the ubvs may involve a syntax element“str_length_minus1N”. If the current string is unmatched pixels, pixelvalues of the unmatched pixels and a count of consecutive unmatchedpixels in the current string may need to be transmitted. A length of theunmatched pixels may involve syntax elements“sc_unmatched_pixel_num_minus1” and “unmatched_pixel_max_length_minus1”.The above syntax elements involved by the length of the current stringare shown in Table (2).

TABLE 2 Syntax element Description pixel_duplication_count_minus1 Thesyntax element indicates that the length of an evs minus 1.str_length_minus1[i] The syntax element indicates that the length of anubvs minus 1. isc_unmatched_pixel_num_minus1 The syntax elementindicates that the length of an unmatched string minus 1.unmatched_pixel_max_length_minus1 The syntax element indicates that themaximum of the count of pixels in an unmatched string minus 1.

In some embodiments, in order to enable the decoder to construct the Srblist, the encoder may need to transmit three values “num_of_reused_pv”,“num_of_new_pv”, and “prev_pv_not_reused_run”. The “num_of_reused_pv”may indicate a count of frequently-occurring pixels in a historicalfrequently-occurring pixel list extracted by the current block. The“prev_pv_not_reused_run” may indicate that when the historicalfrequently-occurring pixel list is scanned from the beginning, onehistorical frequently-occurring pixel may appear every few indexes, andthe decoder may take the historical frequently-occurring pixel out andput it into the frequently-occurring pixel list. The “num_of_new_pv” mayindicate a count of new frequently-occurring pixels in the currentblock. Differential coding may be provided when an index of afrequently-occurring pixel corresponding to an evs is encoded andtransmitted. That is, the index corresponding to current evs is nottransmitted directly, and a difference between the index correspondingto a current evs and an index corresponding to a previous evs of thecurrent evs may be determined. Further, the difference between the indexcorresponding to the current evs and an index corresponding to theprevious evs of the current evs may be transmitted. If the differencebetween the index corresponding to the current evs and an indexcorresponding to the previous evs of the current evs is less than 0, thedifference needs to add the “num_of_reused_pv” and a count of newfrequently-occurring pixels that have been encoded to ensure that thetransmitted value is not a negative number.

The encoded block may be obtained based on the above embodiments,thereby improving the quality of the video coding. Further, the encodedblock may be decoded and reconstructed based on the type of theprediction string of the target prediction string in the encoded block,that is, the encoded block may be decoded and reconstructed bydistinguishing the type of the prediction string of the targetprediction string, thereby improving the decoding quality.

In some embodiments, the video coding and decoding method in the presentdisclosure may be applied to Audio Video Coding Standard 3 (AVS3). TheAVS3 is a third generation video coding standard formulated by China AVSworking group and suitable for a variety of application scenarios suchas Ultra HD TV Broadcasting, virtual reality (VR), and video monitoring,or the like.

In some embodiments, the video coding and decoding method in the presentdisclosure may be applied to a screen content scene (SCC) (e.g.,encoding images generated by a computer), a natural image scene (e.g.,encoding natural images), and a mixed scene of the SCC and the naturalimage scene.

FIG. 5 is a block diagram illustrating an exemplary video processingsystem according to some embodiments of the present disclosure. As shownin FIG. 5 , a system 500 may include a determination module 510, a firstcost determination module 520, a second cost determination module 530,and a prediction module 540.

The determination module 510 may be configured to determine a currentstring in a coding unit (CU) of an image frame. More descriptionsregarding the determining of the current string may be found elsewherein the present disclosure, for example, operation 310 in FIG. 3 andrelevant descriptions thereof.

The first cost determination module 520 may be configured to determine afirst cost based on pixels with a same pixel value in the currentstring. More descriptions regarding the determining of the first costmay be found elsewhere in the present disclosure, for example, operation320 in FIG. 3 and relevant descriptions thereof.

The second cost determination module 530 may be configured to determinea second cost based on one or more strings that are located above thecurrent string. More descriptions regarding the determining of thesecond cost may be found elsewhere in the present disclosure, forexample, operation 330 in FIG. 3 and relevant descriptions thereof.

The prediction module 540 may be configured to determine a predictionstring of the current string based on the first cost and the secondcost. More descriptions regarding the determining of the predictionstring of the current string may be found elsewhere in the presentdisclosure, for example, operation 340 in FIG. 3 and relevantdescriptions thereof.

In some embodiments, the system 500 may further include a fusion module(not shown). The fusion module may be configured to designate twoadjacent strings among strings that have been predicted in the CU andsatisfy a condition as a pair of target strings. The fusion module maybe configured to determine one or more fusion prediction strings byfusing the pair of target strings based on prediction strings of thepair of target strings and a fusion degree, the fusion degree includingat least one of complete fusion or incomplete fusion. The fusion modulemay be further configured to determine one or more target predictionstrings of the pair of target strings based on prediction costs of theprediction strings of the pair of target strings and prediction costs ofthe one or more fusion prediction strings. More descriptions regardingthe fusion of the pair of target strings may be found elsewhere in thepresent disclosure, for example, FIGS. 4A-4D and relevant descriptionsthereof.

In some embodiments, the system 500 may further include an encodingmodule (not shown). The encoding module may be configured to obtain anencoded string corresponding to the current string. The encoding modulemay be further configured to encode the encoded string based on theprediction string of the current string. Specifically, in response tothat a type of the prediction string is ubvs, the encoding module may beconfigured to obtain a pixel row spacing corresponding to a predictionvector of the prediction string and a count of pixel rows occupied bythe prediction string. In response to that the count of pixel rowsoccupied by the prediction string is greater than the pixel row spacingcorresponding to the prediction vector of the prediction string, theencoding module may be configured to divide the prediction string into aplurality of sub prediction strings. A count of pixel rows occupied byeach of the plurality of sub prediction strings may be greater than thepixel row spacing. Further, the encoding module may be configured todecode the plurality of sub prediction strings in turn.

The modules in the video processing system 500 may be connected to orcommunicate with each other via a wired connection or a wirelessconnection. The wired connection may include a metal cable, an opticalcable, a hybrid cable, or the like, or any combination thereof. Thewireless connection may include a Local Area Network (LAN), a Wide AreaNetwork (WAN), a Bluetooth, a ZigBee, a Near Field Communication (NFC),or the like, or any combination thereof. In some embodiments, two ormore of the modules may be combined as a single module, and any one ofthe modules may be divided into two or more units.

FIG. 6 is a schematic diagram illustrating an exemplary video processingdevice according to some embodiments of the present disclosure. In someembodiments, the video processing system 100 and/or the video processingsystem 500 may be implemented by software and/or hardware, and/or may beintegrated into the video processing device 600.

As shown in FIG. 6 , the video processing device 600 may include aprocessing device 610 (also referred to as a processor). The processingdevice may be configured to process information and/or data relating tothe video processing to perform one or more functions described in thepresent disclosure. For example, the processing device 610 may beconfigured to implement any one of the embodiments or any combinationthereof in the present disclosure.

In some embodiments, the processing device 610 may include a centralprocessing unit (CPU). In some embodiments, the processing device 610may include an integrated circuit chip configured to process signals. Insome embodiments, the processing device 610 may include ageneral-purpose processor, a digital signal processor (DSP), anapplication specific integrated circuit (ASIC), a field programmablegate array (FPGA), other programmable logic device, a discrete gate, atransistor logic device, a discrete hardware component, or the like, orany combination thereof. The general-purpose processor may include amicroprocessor. In some embodiments, the processing device 610 mayinclude any conventional processor.

In some embodiments, the video processing device 600 may include astorage 620. The storage 620 may be configured to store instructionsand/or data required for operations of the processing device 610. Insome embodiments, the storage 620 may include a medium that may storeprogram codes, such as a U disk, a mobile hard disk, a read-only memory(ROM), a random access memory (RAM), a magnetic disk, an optical disk,or the like, or any combination thereof. In some embodiments, thestorage 620 may include terminal devices such as a computer, a server, amobile phone, a tablet, or the like, or any combination thereof.

FIG. 7 is a schematic diagram illustrating an exemplarycomputer-readable storage medium according to some embodiments of thepresent disclosure. The computer-readable storage medium 700 may beconfigured to store instruction/program data 710. When theinstruction/program data 710 is executed, any one of the embodiments ofthe video processing method may be implemented. In some embodiments, theinstruction/program data 710 may be in a form of a program file andstored in the storage 620 in a form of a software product. A computerdevice (e.g., the video processing device 600, the video processingsystem 100, the video processing system 500) personal computer, aserver, or a network device, etc.) or a processor may perform all orpart of the operations of the embodiments of the present disclosure.

Having thus described the basic concepts, it may be rather apparent tothose skilled in the art after reading this detailed disclosure that theforegoing detailed disclosure is intended to be presented by way ofexample only and is not limiting. Various alterations, improvements, andmodifications may occur and are intended to those skilled in the art,though not expressly stated herein. These alterations, improvements, andmodifications are intended to be suggested by this disclosure, and arewithin the spirit and scope of the exemplary embodiments of thisdisclosure.

Moreover, certain terminology has been used to describe embodiments ofthe present disclosure. For example, the terms “one embodiment,” “anembodiment,” and/or “some embodiments” mean that a particular feature,structure, or characteristic described in connection with the embodimentis included in at least one embodiment of the present disclosure.Therefore, it is emphasized and should be appreciated that two or morereferences to “an embodiment” or “one embodiment” or “an alternativeembodiment” in various portions of this specification are notnecessarily all referring to the same embodiment. Furthermore, theparticular features, structures, or characteristics may be combined assuitable in one or more embodiments of the present disclosure.

Further, it will be appreciated by one skilled in the art, aspects ofthe present disclosure may be illustrated and described herein in any ofa number of patentable classes or context including any new and usefulprocess, machine, manufacture, or collocation of matter, or any new anduseful improvement thereof. Accordingly, aspects of the presentdisclosure may be implemented entirely hardware, entirely software(including firmware, resident software, micro-code, etc.) or combiningsoftware and hardware implementation that may all generally be referredto herein as a “unit,” “module,” or “system.” Furthermore, aspects ofthe present disclosure may take the form of a computer program productembodied in one or more computer readable media having computer-readableprogram code embodied thereon.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including electromagnetic, optical, or thelike, or any suitable combination thereof. A computer readable signalmedium may be any computer readable medium that is not a computerreadable storage medium and that may communicate, propagate, ortransport a program for use by or in connection with an instructionexecution system, apparatus, or device. Program code embodied on acomputer readable signal medium may be transmitted using any appropriatemedium, including wireless, wireline, optical fiber cable, RF, or thelike, or any suitable combination of the foregoing.

Computer program code for carrying out operations for aspects of thepresent disclosure may be written in a combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Scala, Smalltalk, Eiffel, JADE, Emerald, C++, C#, VB. NET,Python or the like, conventional procedural programming languages, suchas the “C” programming language, Visual Basic, Fortran 2003, Perl, COBOL2002, PHP, ABAP, dynamic programming languages such as Python, Ruby, andGroovy, or other programming languages. The program code may executeentirely on the user's computer, partly on the user's computer, as astand-alone software package, partly on the user's computer, and partlyon a remote computer or entirely on the remote computer or server. Inthe latter scenario, the remote computer may be connected to the user'scomputer through any type of network, including a local area network(LAN) or a wide area network (WAN), or the connection may be made to anexternal computer (for example, through the Internet using an InternetService Provider) or in a cloud computing environment or offered as aservice such as a Software as a Service (SaaS).

Furthermore, the recited order of processing elements or sequences, orthe use of numbers, letters, or other designations thereof, are notintended to limit the claimed processes and methods to any order exceptas may be specified in the claims. Although the above disclosurediscusses through various examples what is currently considered to be avariety of useful embodiments of the disclosure, it is to be understoodthat such detail is solely for that purpose, and that the appendedclaims are not limited to the disclosed embodiments, but, on thecontrary, are intended to cover modifications and equivalentarrangements that are within the spirit and scope of the disclosedembodiments. For example, although the implementation of variouscomponents described above may be embodied in a hardware device, it mayalso be implemented as a software-only solution, e.g., an installationon an existing server or mobile device.

Similarly, it should be appreciated that in the foregoing description ofembodiments of the present disclosure, various features are sometimesgrouped together in a single embodiment, figure, or description thereoffor the purpose of streamlining the disclosure aiding in theunderstanding of one or more of the various embodiments. This method ofdisclosure, however, is not to be interpreted as reflecting an intentionthat the claimed subject matter requires more features than areexpressly recited in each claim. Rather, claimed subject matter may liein less than all features of a single foregoing disclosed embodiment.

1. A method, comprising: determining a current string in a coding unit(CU) of an image frame, the current string including one or more pixels;determining a first cost based on pixels with a same pixel value in thecurrent string; determining a second cost based on one or more stringsthat are located above the current string; and determining a predictionstring of the current string based on the first cost and the secondcost, wherein the determining the prediction string of the currentstring based on the first cost and the second cost includes designatingthe current string as the prediction string of the current string inresponse to that the first cost and the second cost are not determined.2. The method of claim 1, wherein the determining the second cost basedon the one or more strings that are located above the current stringincludes: comparing the current string with the one or more strings thatare pointed to by a plurality of preset vectors, a count of the one ormore strings being larger than 1; determining, based on the comparison,a target string from the one or more strings; and designating a cost ofthe target string as the second cost
 3. (canceled)
 4. The method ofclaim 1, further including: designating two adjacent strings amongstrings that have been predicted in the CU and satisfy a condition as apair of target strings; determining one or more fusion predictionstrings by fusing the pair of target strings based on prediction stringsof the pair of target strings and a fusion degree, the fusion degreeincluding at least one of complete fusion or incomplete fusion; anddetermining one or more target prediction strings of the pair of targetstrings based on prediction costs of the prediction strings of the pairof target strings and prediction costs of the one or more fusionprediction strings. 5-6. (canceled)
 7. The method of claim 1, whereindetermining the current string by setting a length of the current stringbeing an integer multiple of a reference value, the reference valuebeing a natural number larger than
 1. 8-13. (canceled)
 14. The method ofclaim 1, further including: obtaining an encoded string corresponding tothe current string; and encoding the encoded string based on theprediction string of the current string, wherein the encoding theencoded string based on the prediction string of the current stringincludes: obtaining, in response to that a type of the prediction stringis ubvs, a pixel row spacing corresponding to a prediction vector of theprediction string and a count of pixel rows occupied by the predictionstring; dividing, in response to that the count of pixel rows occupiedby the prediction string is greater than the pixel row spacingcorresponding to the prediction vector of the prediction string, theprediction string into a plurality of sub prediction strings, a count ofpixel rows occupied by each of the plurality of sub prediction stringsbeing greater than the pixel row spacing; and decoding the plurality ofsub prediction strings in turn.
 15. A system, comprising: at least onestorage device including a set of instructions; and at least oneprocessor in communication with the at least one storage device, whereinwhen executing the set of instructions, the at least one processor isdirected to perform operations including: determining a current stringin a coding unit (CU) of an image frame, the current string includingone or more pixels; determining a first cost based on pixels with a samepixel value in the current string; determining a second cost based onone or more strings that are located above the current string; anddetermining a prediction string of the current string based on the firstcost and the second cost, wherein the determining the prediction stringof the current string based on the first cost and the second costincludes designating the current string as the prediction string of thecurrent string in response to that the first cost and the second costare not determined.
 16. The system of claim 15, wherein the determiningthe second cost based on the one or more strings that are located abovethe current string includes: comparing the current string with the oneor more strings that are pointed to by a plurality of preset vectors, acount of the one or more strings being larger than 1; determining, basedon the comparison, a target string from the one or more strings; anddesignating a cost of the target string as the second cost.
 17. Thesystem of claim 16, wherein the count of the one or more strings isobtained by mapping a height of the CU based on a preset mappingrelationship, the preset mapping relationship including a multiplelinear relationship or a nonlinear relationship.
 18. The system of claim15, the operations further include: designating two adjacent stringsamong strings that have been predicted in the CU and satisfy a conditionas a pair of target strings; determining one or more fusion predictionstrings by fusing the pair of target strings based on prediction stringsof the pair of target strings and a fusion degree, the fusion degreeincluding at least one of complete fusion or incomplete fusion; anddetermining one or more target prediction strings of the pair of targetstrings based on prediction costs of the prediction strings of the pairof target strings and prediction costs of the one or more fusionprediction strings.
 19. The system of claim 18, wherein the determiningthe one or more fusion prediction strings by fusing the pair of targetstrings based on the prediction strings of the pair of target stringsand the fusion degree includes: in response to styles of the predictionstrings of the pair of target strings being the same, determining onefusion prediction string by fusing the pair of target strings based onthe complete fusion.
 20. The system of claim 18, wherein the determiningthe one or more fusion prediction strings by fusing the pair of targetstrings based on the prediction strings of the pair of target stringsand the fusion degree includes: in response to styles of the predictionstrings of the pair of target strings being different, determining twofusion prediction strings by fusing the pair of target strings based onthe incomplete fusion.
 21. The system of claim 15, wherein determiningthe current string by setting a length of the current string being aninteger multiple of a reference value, the reference value being anatural number larger than
 1. 22. The system of claim 21, wherein thedetermining the current string includes: determining the current stringby increasing a length of the current string to the integer multiple ofthe reference value.
 23. The system of claim 21, wherein the determiningthe current string includes: determining the current string by reducinga length of the current string to the integer multiple of the referencevalue.
 24. The system of claim 21, wherein the determining the currentstring includes: determining the current string based on a style of thecurrent string, the style including one of unmatched pixels, an equalvalue string (evs), and a unit basis vector string (ubvs) determinedbased on a plurality of preset vectors.
 25. The system of claim 24,wherein the style of the current string is the unmatched pixels, and thedetermining the current string based on the style of the current stringincludes: determining the current string by increasing unmatched pixelsin the current string.
 26. The system of claim 24, wherein the style ofthe current string is the evs or the ubvs determined based on theplurality of preset vectors, and the determining the current stringbased on the style of the current string includes: determining thecurrent string by reducing a length of the evs or the ubvs to theinteger multiple of the reference value.
 27. The system of claim 15,wherein the determining the prediction string of the current stringbased on the first cost and the second cost includes: comparing thefirst cost and the second cost; and determining the predicted string ofthe current string based on the comparison.
 28. The system of claim 15,the operations further include: obtaining an encoded stringcorresponding to the current string; and encoding the encoded stringbased on the prediction string of the current string; wherein theencoding the encoded string based on the prediction string of thecurrent string includes: obtaining; in response to that a type of theprediction string is ubvs, a pixel row spacing corresponding to aprediction vector of the prediction string and a count of pixel rowsoccupied by the prediction string; dividing, in response to that thecount of pixel rows occupied by the prediction string is greater thanthe pixel row spacing corresponding to the prediction vector of theprediction string, the prediction string into a plurality of subprediction strings, a count of pixel rows occupied by each of theplurality of sub prediction strings being greater than the pixel rowspacing; and decoding the plurality of sub prediction strings in turn.29-42. (canceled)
 43. A non-transitory computer readable medium,comprising executable instructions that, when executed by at least oneprocessor, direct the at least one processor to perform a method, themethod comprising: determining a current string in a coding unit (CU) ofan image frame, the current string including one or more pixels;determining a first cost based on pixels with a same pixel value in thecurrent string; determining a second cost based on one or more stringsthat are located above the current string; and determining a predictionstring of the current string based on the first cost and the secondcost, wherein the determining the prediction string of the currentstring based on the first cost and the second cost includes designatingthe current string as the prediction string of the current string inresponse to that the first cost and the second cost are not determined.